//
//  URLManager.h
//  ZDSC
//
//  Created by ZDTX on 2021/5/12.
//

#import "AFHTTPSessionManager.h"

NS_ASSUME_NONNULL_BEGIN
extern NSString * const kServiceBaseUrl;


//10000006 登陆失败 账户已过期，请重新登录
typedef NS_ENUM(NSInteger, RequestService) {
    RequestServiceSystem,
    RequestServiceWorkBench,
    RequestServiceMessage,
    RequestServiceActiviti
};

@interface URLManager : AFHTTPSessionManager


+ (instancetype)sharedURLManager;

- (void)postUrlString:(NSString *_Nullable)urlString
            requestService:(RequestService)requestService
                parameters:(NSDictionary *_Nullable)parameters
                  progress:(void(^_Nullable)(NSProgress * _Nonnull downloadProgress))progress
                   success:(void(^_Nullable)(id _Nullable responseObject))success
                   failure:(void(^_Nullable)(NSError * _Nonnull error))failure;

- (void)getUrlString:(NSString *_Nullable)urlString
            requestService:(RequestService)requestService
                parameters:(NSDictionary *_Nullable)parameters
                  progress:(void(^_Nullable)(NSProgress * _Nonnull downloadProgress))progress
                   success:(void(^_Nullable)(id _Nullable responseObject))success
                   failure:(void(^_Nullable)(NSError * _Nonnull error))failure;

// 上传文件
-(void)uploadImageWithUrlString:(NSString *)urlStr
                     parameters:(NSDictionary *)parameters
                     imageArray:(NSArray *)imageArray
                        success:(void(^_Nullable)(id _Nullable responseObject))success
                        failure:(void(^_Nullable)(NSError * _Nonnull error))failure;
@end

NS_ASSUME_NONNULL_END
